package com.hospital.post.service;

import com.hospital.common.pojo.TSection;
import com.hospital.post.dto.AddFloorDto;
import com.hospital.post.dto.AddPostDto;
import com.hospital.post.dto.AddReportDto;
import com.hospital.post.vo.PostContentVo;
import com.hospital.post.vo.PostMetaVo;
import com.hospital.post.vo.SectionVo;

import java.util.List;

public interface PostService
{

    List<TSection> getSections();

    List<SectionVo> getAllSections();

    List<PostMetaVo> getPosts(Long sectionId,Integer pinnedOnly, Integer pageNum, Integer pageSize);

    List<PostContentVo> getPostDetail(Long postId, Integer pageNum, Integer pageSize,Integer subPageSize,Long LZOnly);

    Integer getPostCount(Long sectionId,Integer pinnedOnly);

    Integer getPostDetailCount(Long postId, Long LZOnly);

    Long addPost(AddPostDto addPostDto, Long authorId,Integer authorRole);

    PostContentVo getFloor(Long floorId, Integer subPageSize);

    Long addFloor(AddFloorDto addFloorDto, Long authorId, Integer authorRole);

    Boolean getHasLiked(Long userId,Long metaId);

    Boolean getHasBeenFavorite(Long userId, Long metaId);

    Boolean addLike(Long userId, Long metaId,Integer like);

    Boolean addFavorite(Long userId, Long metaId, Integer favorite);

    Integer getFavoritesCount(Long userId);

    List<PostMetaVo> getFavorites(Long userId, Integer pageNum, Integer pageSize);

    Boolean redisLikeToMysql();

    Long getAuthorIdByMetaId(Long metaId);

    Integer deletePost(Long metaId, Long userId);

    Long getAuthorIdByFloorId(Long floorId);

    Integer deleteFloor(Long floorId, Long userId);

    Boolean addReport(AddReportDto addReportDto, Long userId);

    Long getSectionIdByMetaId(Long metaId);

    Integer getMyPostsCount(Long userId);

    List<PostMetaVo> getMyPosts(Long userId, Integer pageNum, Integer pageSize);

    Integer getMyRepliesCount(Long userId);

    List<PostContentVo> getMyReplies(Long userId, Integer pageNum, Integer pageSize);

    Integer getSubPostCount(Long floorId);

    List<PostContentVo> getSubPosts(Long postId, Integer pageNum, Integer pageSize);
}
